-- GENERATED SPELL FOR [Flesheating Ghoul] --


function spell0_27871(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(50933,pUnit)
pUnit:RegisterEvent('Sorts_27871', 646, 1)
end

function spell1_27871(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(46202,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27871', 10000, 1)
end

function Sorts_27871(pUnit, Event)
local choix_sorts_27871 = math.random(0, 1)
if choix_sorts_27871 == 0 then
pUnit:RegisterEvent('spell0_27871', 1, 1)
end
if choix_sorts_27871 == 1 then
pUnit:RegisterEvent('spell1_27871', 1, 1)
end
end

function mob27871_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27871', math.random(1500, 3000), 1)
end

function mob27871_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27871_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27871_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27871, 1, 'mob27871_Action')
RegisterUnitEvent(27871, 2, 'mob27871_Leave')
RegisterUnitEvent(27871, 3, 'mob27871_Kill')
RegisterUnitEvent(27871, 4, 'mob27871_Die')
